<extend name="Layout/ins_page" />

<block name="content">
    {:W('PageHeader/adv_search',array('name'=>'工单查询','search'=>'M'))}

    <link href="/sap/demo.css" rel="stylesheet" type="text/css" />
    <script src="/sap/scripts/boot.js" type="text/javascript"></script>
    <form method="post" name="form_adv_search" id="form_adv_search">

        <div class="adv_search panel panel-default hidden" id="adv_search">

            <div class="panel-heading">
                <div class="row">
                    <h4 class="col-xs-6">高级搜索</h4>
                    <div class="col-xs-6 text-right">
                        <a  class="btn btn-sm btn-info" onclick="submit_adv_search();">搜索</a>
                        <a  class="btn btn-sm" onclick="close_adv_search();">关闭</a>
                    </div>
                </div>
            </div>
            <div class="panel-body">
                <div class="form-group col-sm-6">
                    <label class="col-sm-4 control-label" for="li_name">状态：</label>
                    <div class="col-sm-8">
                        <select class="form-control" name="type" id="sex">
                            <option value="-1">全部</option>
                            <option value="0">待回复</option>
                            <option value="1">已处理</option>
                            <option value="2">已完结</option>
                        </select>
                    </div>
                </div>


            </div>
        </div>
    </form>
    <div class="ul_table ul_table_responsive" style="font-size:14px" >
        <ul>
            <li class="thead" style="padding-left:10px">
                <div class="autocut auto">
                    <!--<span class="col-16 ">工单号</span>-->
                    <span class="col-40 ">问题主题</span>
                    <span class="col-10 ">处理状态</span>
                    <span class="col-16 ">工单时间</span>
                    <span class="col-16 ">发起人</span>
                    <span class="col-16 ">对接人</span>
                    <span class="col-16 ">最后操作人</span>
                    <span class="col-16 ">更新时间</span>
                </div>

            </li>
        </ul>
        <empty name="list">
            <ul>
                <li class="no-data">
                    没找到数据
                </li>
            </ul>
            <else/>
            <form method="post" action="" name="form_data" id="form_data">
                <ul>

                    <?php foreach($list as $vo){

				?>
                    <li class="tbody ">
                        <div class="autocut auto">
                            <!--<span class="col-16 "><?php echo $vo['wk_no']?>&nbsp;</span>-->
                            <span class="col-40 " style="overflow:scroll;overflow-x:hidden;overflow-y:hidden;" ><?php echo $vo['q_subject']?>&nbsp;</span>
                            <span class="col-10 ">&nbsp;&nbsp;<?php echo $vo['status']==0?"待回复":($vo['status']==1?"已处理":'已完结') ?>&nbsp;</span>
                            <span class="col-16 "><?php echo $vo['ctime']?>&nbsp;</span>
                            <span class="col-16 "><?php echo $vo['createuser']?>&nbsp;</span>
                            <span class="col-16 "><?php echo $vo['senduser']?>&nbsp;</span>
                            <span class="col-16 "><?php echo $vo['lastuser']?>&nbsp;</span>
                            <span class="col-16 "><?php echo $vo['utime']?>&nbsp;</span>
                            <span class="col-15 ">
							<a href="/index.php?m=&c=wkorder&a=infodp20171120&code=<?php echo $vo['wk_no']?>"  >详情</a></span>
                        </div>
                    </li>
                    <?php } ?>
                </ul>
            </form>
            <div class="pagination">
                {$page}
            </div>
        </empty>
    </div>

    <div style="right:20px; top:88px; position:absolute;display: none;z-index: 99999;background-color: #ffffff;box-shadow: -2px 10px 10px  #888888;-moz-box-shadow: -2px 10px 10px #888888;" id='qdan-show'>
        <div id="grid2" class="mini-datagrid" style="width:600px;height:500px;border: 1px solid gray"
             idField="id"  multiSelect="true" showPager="false"
             allowCellEdit="true" allowCellSelect="true"
        >
            <div property="columns">
                <div type="checkcolumn"></div>
                <div header="物料编号" field="code" width="80px"></div>
                <div header="物料名称" field="name"  width="200px"></div>

            </div>
        </div>
        &nbsp; <input type="button" value="移除所选物料" onclick="removes()" style="width:100px;"/> &nbsp;&nbsp;<a  href='javascript:void(0)' class='close_show' >关闭</a>
    </div>




    <script type="text/javascript">

        mini.parse();
        var grid2 = mini.get("grid2");


        function saveauth(){
            loadingmsg('保存中....');
            var users = mini.get('textarea1').getValue();
            $.ajax({
                url: "/Shelves/saveauth",
                type: "post",
                data: { users:users},
                dataType:'json',
                success: function (data) {
                    $('#myModal').modal('toggle');
                    colseloading();
                    if(data>0)
                        mini.alert('保存成功');

                }
            });

        }

    </script>
</block>



